<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ page import="java.util.*" %>
<%@ page import="net.ysen.tree.test.ExampleTreeSupport" %>
<%
ExampleTreeSupport s = new ExampleTreeSupport();        
List list = ExampleTreeSupport.QueryDepartData();
final String treebody = s.writeTree(list, false, "ystree");
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title> - Example Tree - </title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">

      <script type="text/javascript" src="resource/js/ystree.pack.js"></script>
      <script type="text/javascript">
      var ystree = new YsTree('ystree');//树对象句柄
      ystree.config.showCheckBox = false;//是否启用checkbox
      //点击节点文字触发的事件
      function nodeText_clicked(nodeid){
      	alert(nodeid);
      }
      window.onload=function(){
		//ystree.aNodes[0].id=ystree.aNodes[2].id;
		ystree.aNodes.remove(4);
		ystree.aNodes.remove(4);
		writeTreeCode();
	}
      </script>
  </head>
  
  <body>
    <input id="ystreenodeid" type="hidden" name="ystreenodeid">
    <%=treebody %>
    <div>
    	other info......
    </div>
  </body>

</html>
